<%@ page contentType="text/html; charset=UTF-8" %>

<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
<html>
    <head>
        <link rel='stylesheet' id='jquery-ui-all-css' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css?ver=3.0.1' type='text/css' media='all' />
        <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.4.min.js"></script>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.js"></script>
        <script type="text/javascript" src="http://struts2-jquery-plugin.googlecode.com/svn-history/r168/trunk/src/main/resources/org/apache/struts2/static/jquery/jquery.subscribe.1.2.min.js"></script>
        <script type="text/javascript" src="http://struts2-jquery.googlecode.com/svn-history/r1281/trunk/struts2-jquery-plugin/src/main/resources/template/js/base/jquery.ui.core.min.js"></script>
        <link id="jquery_theme_link" rel="stylesheet" href="http://struts2-jquery-plugin.googlecode.com/svn-history/r168/trunk/src/main/resources/org/apache/struts2/static/jquery/theme/smoothness/jquery-ui.css" type="text/css"/>
        <title><s:text name="HelloWorld.message"/></title>
        <style type="text/css">
            .listaccount {
                text-align: center;
                border: aqua solid 1px;
            }
        </style>
        <sj:head />
    </head>

    <body>
        <h2><s:property value="message"/></h2>
        <s:form action="register" method="post">
            <s:url id="databaseList" action="AutocompleteField" namespace="example" />
            <sj:autocompleter
                id="autoAccount"
                delay="50"
                loadMinimumCount="2"
                list="json"
                name="echo"
                selectBox="false"
                label="Jquery"/>
            <table class="listaccount">
                <tr>
                <tr>
                    <td>Tên tài khoản</td>
                    <td>Mật khẩu</td>
                    <td>Họ tên</td>
                </tr>
            <s:iterator value="accountList" id="autoAccount">
                <tr>
                    <td><s:property value="%{username}"/></td>
                    <td><s:property value="%{password}"/></td>
                    <td><s:property value="%{givenName + ' ' + familyName}"/></td>
                </tr>
            </s:iterator>
            </table>
            <s:submit/>
        </s:form>
    </body>
</html>

